﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelloCLI
{
    class Program
    {
        static void Main(string[] args)
        {
            var persons = new List<Person>{
                new Person{ Name = "maxwell", Age=30},
                new Person{Name="Alice" , Age=27}
            };

            foreach (var person in persons)
            {
                Console.WriteLine(person);
            }
        }
    }

    public class Person
    {
        public string Name { get; set; }

        public int Age { get; set; }

        public override string ToString()
        {
            return string.Format("Name:{0}, Age:{1}", Name, Age);
        }
    }
}
